package com.geektime.hello.controller;

import com.geektime.hello.annotation.OperLog;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Auther DRevelation
 * @Date 2020-05-27 下午 16:57
 * @Desc
 */
@RestController
@RequestMapping("hello")
public class HelloController {

    @RequestMapping
    @OperLog(title = "hello")
    public ResponseEntity hello() {
        return ResponseEntity.ok("Hello SpringBoot!!!");
    }

    @GetMapping("hello1")
    @OperLog(title = "hello1")
    public String hello1() {
        return "Hello 1";
    }

    @GetMapping("/hello2")
    @OperLog(title = "hello2")
    public String hello2() {
        return "Hello 2";
    }

    @PostMapping("/list")
    @OperLog(title = "list")
    public void list(@RequestParam List<Long> list) {
        System.out.println(list);
    }
}
